:
\setupinteraction
[title=FooBar]
\setupdocument
[metadata:title=FooBar]
that just sets defaults for \setupinteraction so that they inherit from
document
\setupmetadata
[title=FooBar]
that's for those who go global
Are any of those deprecated or the preferred way? I'm starting to
get
:
\setupinteraction
[title=FooBar]
\setupdocument
[metadata:title=FooBar]
\setupmetadata
[title=FooBar]
Are any of those deprecated or the preferred way? I'm starting to
get confused.
There’s also \settaggedmetadata; I actually didn’t know \setupmetadata.
Both are missing in the wiki yet
ction
[title=FooBar]
\setupdocument
[metadata:title=FooBar]
\setupmetadata
[title=FooBar]
Are any of those deprecated or the preferred way? I'm starting to
get confused.
Marco
___
If your question is of interest to o
command
\starttext
\startbuffer[version]
20230529a
\stopbuffer
Version: \inlinebuffer[version]-en
\stoptext
but buffers aren't the right tool to store strings like version information.
One alternative solution is to set the string with the \setupdocument
command.
\setupdocument
[version
elegant solution!
you can try \setupdocument but i didn't test that
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69
the end but before the main \stopdocument), this time with
[metadata:title={Regulations}] instead of the original
[metadata:title={Constitutions}]. However, I have a strong feeling this
is not a very elegant solution!
you can try \setupdocument but i didn't test
:setup
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{document|p}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:setup}
\startxmlsetups xml:document
\xmlfilter{#1}{/title/command(xml:title)}
\xmlfilter{#1}{/author/command(xml:author)}
\startdocument
\xmlflush{#1}
\stopdocument
\
ad/meta[@name='author']/command(xml:author)} % What
> > goes here to make this dynamic?
> > %\xmlfilter{#1}{/head/meta[@name='journal']/command(xml:journal)}
> > \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author
> > \setupdocument[author={\xmlatt{#1}{content}}]
ead/meta[@name='journal']/command(xml:journal)}
\xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author
\setupdocument[author={\xmlatt{#1}{content}}]
\setupdocument[metadata:author={\xmlatt{#1}{content}}]
\setupinteraction[author={\documentvariable{author}}] \stopxmlsetups %
How can this be generali
xmlsetups xml:author
\setupdocument[author={\xmlatt{#1}{content}}]
\setupdocument[metadata:author={\xmlatt{#1}{content}}]
\setupinteraction[author={\documentvariable{author}}]\stopxmlsetups
% How can this be generalized?%\startxmlsetups xml:journal
%\setupdocument[journal={\xmlatt{#1}{conte
w to best store text for later use:
>
> I've tried using buffers, but this here doesn't work:
>
> ==
> \startxmlsetups xml:article-meta
> \setupdocument [
> pub-year=\xmlfilter{#1}{/pub-date/year/command(xml:article-meta:pubdate:year)},
> volume=\xm
Hi,
For typesetting XML I'm wondering how to best store text for later use:
I've tried using buffers, but this here doesn't work:
==
\startxmlsetups xml:article-meta
\setupdocument [
pub-year=\xmlfilter{#1}{/pub-date/year/command(xml:article-meta:pubdate:year)},
volume
th the old one but
still gave a presentation using it. Here's an example:
\definedocument[thesis]
\setupdocument[a=b,e=f]
\setupdocument[thesis][a=x,c=d]
% \startsetups[thesis:start]
\startsetups[document:start]
START
\stopsetups
\startsetups[thesis:stop]
% \startsetups[document:stop
hould be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct
the filename of the component/product to \startcomponent and not
some dummy name (or just use *), this allows you to print the filename
with \currentcomponent or \currentproduct
2. Use \setvariables or \setupdocument to set the document title,
revision etc.
3. Use \startsectionblockenvironment to move
exactly doesn't work and do you get the same problems when you set the
values in the following minimal example (everything has to be in the same file).
begin example
\setupdocument
[metadata:title={\documentvariable{title}},
metadata:subtitle={\documentvariable{subtitle
wing minimal example (everything has to be in the same
>>> file).
>>>
>>> begin example
>>> \setupdocument
>>>[metadata:title={\documentvariable{title}},
>>> metadata:subtitle={\documentvariable{subtitle}},
>>>
Alan Braslau schrieb am 25.07.2020 um 00:21:
On 22/07/20 22:36, Wolfgang Schuster wrote:
What exactly doesn't work and do you get the same problems when you
set the values in the following minimal example (everything has to be
in the same file).
begin example
\setupdocument
On 22/07/20 22:36, Wolfgang Schuster wrote:
What exactly doesn't work and do you get the same problems when you set
the values in the following minimal example (everything has to be in the
same file).
begin example
\setupdocument
[metadata:title={\documentvariable{title
Alan Braslau schrieb am 23.07.2020 um 00:21:
Hello,
I have put the following in an environment
\startenvironment MYENVIRONMENT
\setupdocument
[metadata:title={\documentvariable{title}},
metadata:subtitle={\documentvariable{subtitle}},
metadata:author={\documentvariable{author
Hello,
I have put the following in an environment
\startenvironment MYENVIRONMENT
\setupdocument
[metadata:title={\documentvariable{title}},
metadata:subtitle={\documentvariable{subtitle}},
metadata:author={\documentvariable{author}},
metadata:keywords={\documentvariable{keywords
of the text will be first and how
many parts will be shown.
Can you ask a separate question for each individual problem.
So far, I am trying to get a hang of \setupdocument
(https://wiki.contextgarden.net/Project_structure), \startmode
(https://wiki.contextgarden.net/Modes), \definecolor
(https
will be shown.
So far, I am trying to get a hang of \setupdocument
(https://wiki.contextgarden.net/Project_structure), \startmode
(https://wiki.contextgarden.net/Modes), \definecolor
(https://wiki.contextgarden.net/Color) and \defineparagraphs
(https://wiki.contextgarden.net/Command/defineparagraphs)
I hope
Am 03.02.19 um 17:34 schrieb Wolfgang Schuster:
>
> Use \setupdocument to set the metadata for the PDF. You can access the
> values with the \documentvariable command.
>
> \setuppagenumbering
> [location=]
>
> \setupheadertexts
> [\documentvariable{metadata
into
headertexts?
Background: authors shall define title, subtitle etc in the product file
with setupinteraction (or a better method if available).
In the environment file I want to insert theses informations into
headers and footers.
Use \setupdocument to set the metadata for the PDF. You can
Marco Patzer schrieb am 27.11.18 um 21:37:
Hi,
I do have a project structure with environment, project and component files.
The language of the individual documents is defined in the components using
\setupdocument
[language=sv]
The environment needs to adjust language-dependent
Hi,
I do have a project structure with environment, project and component files.
The language of the individual documents is defined in the components using
\setupdocument
[language=sv]
The environment needs to adjust language-dependent settings. However, when the
environment file is read
text etc. at the begin and end of the document (which can be
used to insert a titlepage or endpage). You can even use \startdocument (or
\setupdocument) to set the document name in the pdf viewer (yes it can also be
done with \setupinteraction but \startdocument is nicer).
A minimal file would
can be
> used to insert a titlepage or endpage). You can even use \startdocument (or
> \setupdocument) to set the document name in the pdf viewer (yes it can also
> be done with \setupinteraction but \startdocument is nicer).
>
> A minimal file would be
>
> \star
content in a document environment which
has hooks to insert text etc. at the begin and end of the document
(which can be used to insert a titlepage or endpage). You can even use
\startdocument (or \setupdocument) to set the document name in the pdf
viewer (yes it can also be done
as
On Fri, 21 Sep 2018 13:01:14 +0200, Hans Hagen wrote:
I'll add documentdata.variable so that one can do this:
\setupdocument
[id=foo]
\startluacode
luatex.wrapup(function()
local id = documentdata.variable("id")
if id and id ~= ""
I'll add documentdata.variable so that one can do this:
\setupdocument
[id=foo]
\startluacode
luatex.wrapup(function()
local id = documentdata.variable("id")
if id and id ~= "" then
local oldname = file.addsuffix(environment.jobname,&quo
= i + 1;
endfor ;
pa := point (0+len*RealPageNumber) of p ;
%draw (pa+(0,10pt))--(pa+(0,-10pt)) withcolor contrastcolor ;
draw pa withpen pencircle scaled 10pt withcolor
contrastcolor ;
fi ;
StopPage ;
\stopuseMPgraphic
\setupbackgrounds
[t
olor
contrastcolor ;
fi ;
StopPage ;
\stopuseMPgraphic
\setupbackgrounds
[text]
[background={PageShape}]
\starttext
\setupdocument[title={Title},location={Place}]
\startdocument
\definecolor[BackgroundColor][r=0,g=.7,b=0]
\startTopic[title={Topic Green}]
Some text A
\start
On 07/17/2016 09:54 PM, Alan BRASLAU wrote:
> Try,
>
> \setupdocument
> [metadata:title={\documentvariable{title}},
>metadata:subtitle={\documentvariable{subtitle}},
>metadata:author={\documentvariable{author}},
>metadata:address={\documentvariable{address}},
&
Try,
\setupdocument
[metadata:title={\documentvariable{title}},
metadata:subtitle={\documentvariable{subtitle}},
metadata:author={\documentvariable{author}},
metadata:address={\documentvariable{address}},
metadata:doi={doi:\documentvariable{doi}},
metadata:keywords
On Fri, 4 Mar 2016 10:34:49 +0100
Hans Hagen <pra...@wxs.nl> wrote:
> On 3/4/2016 7:58 AM, Marco Patzer wrote:
> > Hi!
> >
> > How to expand \translate so that it doesn't show up in the PDF
> > metadata? Example:
> >
> > \setupdocument [metadata:titl
On 3/4/2016 7:58 AM, Marco Patzer wrote:
Hi!
How to expand \translate so that it doesn't show up in the PDF
metadata? Example:
\setupdocument [metadata:title=\documentvariable{title}]
\mainlanguage [sv]
\startdocument [title={\translate[en=Foo, sv=Bar]}]
\input knuth
\stopdocument
{title},
author=\getvariable{information}{title}]
\starttext
\unknown
\stoptext
There is also the \setupdocument command (a simple wrapper for the
\setvariables command)
which uses predefined keywords to set fields in the pdf file. You can
access the values from
\setupdocument command i
ormation]
> [title=Document title,
>author=Author name]
>
> \setupinteraction
> [ state=start,
> title=\getvariable{information}{title},
>author=\getvariable{information}{title}]
>
> \starttext
> \unknown
> \stoptext
>
>
> There is also
hor=Me,
metadata:author=\documentvariable{author}]
...
\stopdocument
I would separate both settings and put \setupdocument somewhere in the
preamble.
\setupdocument
[metadata:title=\documentvariable{title},
metadata:author=\documentvariable{author}]
\startdocument
[title=My title,
aut
Alan BRASLAU <mailto:alan.bras...@cea.fr>
17. Januar 2016 um 19:55
On Sun, 17 Jan 2016 19:27:31 +0100
How does this play with
\startdocument
[title=Document title,
author=Me]
It doesn’t matter if you set the values with \setupdocument or
\startdocument.
Here, I learn about metadata
values and access
> them with \getvariables:
>
> \setvariables
>[information]
>[title=Document title,
> author=Author name]
>
> \setupinteraction
>[ state=start,
> title=\getvariable{information}{title},
> author=\getvariable{information}{title}]
>
>
On 2015-03-25 10:23, Hans Hagen wrote:
\startsetups [document:titlepage]
bla bla \documentvariable{title} bla bla
\stopsetups
\setupdocument
[before=\directsetup{document:titlepage}]
\startdocument[title=Some title]
...
\stopdocument
Thanks.
Can one always use
On 3/27/2015 11:27 PM, Sam Ḥilluc wrote:
On 2015-03-25 10:23, Hans Hagen wrote:
\startsetups [document:titlepage]
bla bla \documentvariable{title} bla bla
\stopsetups
\setupdocument
[before=\directsetup{document:titlepage}]
\startdocument[title=Some title]
...
\stopdocument
Thanks
\documentvariable{title} bla bla
\stopsetups
\setupdocument
[before=\directsetup{document:titlepage}]
\startdocument[title=Some title]
...
\stopdocument
-
Hans Hagen | PRAGMA ADE
On 2013–10–08 Procházka Lukáš Ing. - Pontex s. r. o. wrote:
I'm trying to hook commands.stoptext()...
There is already a hook for that. No need to tinker with Lua.
\setupexternalfigures
[location=default]
\setupdocument
[after=\setups{document:after}]
\startsetups [document:after
On 2013–10–08 Marco Patzer wrote:
On 2013–10–08 Procházka Lukáš Ing. - Pontex s. r. o. wrote:
I'm trying to hook commands.stoptext()...
There is already a hook for that. No need to tinker with Lua.
\setupexternalfigures
[location=default]
\setupdocument
[after=\setups
]
\setupdocument
[after=\setups{document:after}]
\startsetups [document:after]
\startTEXpage
\externalfigure [cow]
\stopTEXpage
\stopsetups
\startdocument
\input knuth
\stopdocument
Marco
OK... But - is there a solution more close and more Lua to that mine?
The example is much simpler than
firstpage (also new key in mult)
lastpage (aso new key in mult)
- The title, subtitle and author inherit from \setupinteraction which already
inherits from \setupdocument (metadata namespace).
- In mtx-epub these variables are picked up (from the epub job specification)
and firstpage / lastpage
On 9-6-2012 02:38, Aditya Mahajan wrote:
I never realized that there was a \setupdocument!
it has been there for a while ... the idea is to set up some vars at the
top (of whatever) and use them later (e.g. variables used in a title
page or colofon). Nothing mandate, just convenience
(aso new key in mult)
- The title, subtitle and author inherit from \setupinteraction which already
inherits from \setupdocument (metadata namespace).
- In mtx-epub these variables are picked up (from the epub job specification)
and firstpage / lastpage are added to the images list
={}]
Backends other than epub can safely ignore the directive.
better is
\setupexport
(actually, we do have \setupdocument which makes een more sense:
(1) take from setupdocument
(2) if empty take from setupexport
(3) otherwise take from setupinteraction
In one of your earlier threads
and author inherit from \setupinteraction which
already inherits from \setupdocument (metadata namespace).
- In mtx-epub these variables are picked up (from the epub job
specification) and firstpage / lastpage are added to the images list.
Nothing has been checked and the firstpage/lastpage image
in mult)
- The title, subtitle and author inherit from \setupinteraction which already
inherits from \setupdocument (metadata namespace).
I never realized that there was a \setupdocument!
This might be the best way to have a document title in ConTeXt:
\startsetups document:start
code
{\ctxlua{…}%
\stoptext}
and use them instead of \starttext and \stoptext.
Or you use the predefined document environment which has before and after keys.
\setupdocument[after={\blank\midaligned{\bf THE END}}]
\startdocument
\input knuth
\stopdocument
Wolfgang
Hi Hans,
ConTeXt has a command (\version[...]) to set the version of the document
but as developer there is no way to get access to this value. Can you
give us a defined register which can be used from other modules (e.g.
fixme).
I would even prefer a new command like \setupdocument where
57 matches
Mail list logo